// import com.alibaba.druid.sql.ast.*;
// import com.alibaba.druid.sql.ast.expr.*;
// import com.alibaba.druid.sql.ast.statement.*;
// import com.alibaba.druid.sql.dialect.mysql.ast.MySqlKey;
// import com.alibaba.druid.sql.dialect.mysql.ast.MySqlPrimaryKey;
// import com.alibaba.druid.sql.dialect.mysql.ast.MySqlUnique;
// import com.alibaba.druid.sql.dialect.mysql.ast.MysqlForeignKey;
// import com.alibaba.druid.sql.dialect.mysql.ast.statement.*;
// import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlCreateTableStatement.TableSpaceOption;
// import com.alibaba.druid.sql.parser.*;
// import com.alibaba.druid.util.FnvHash;
// import com.alibaba.druid.util.MySqlUtils;
#pragma once
#include <string>
#include "../../../parser/SQLCreateTableParser.h"

class SQLCreateTableStatement;
class MySqlExprParser;
class MySqlCreateTableStatement;
class SQLExprParser;
class SQLPartitionBy;
class SQLPartitionByRange;
class SQLPartitionByValue;
class SQLTableConstraint;

class MySqlCreateTableParser : public SQLCreateTableParser
{
public:
  MySqlCreateTableParser(string_ptr  sql);

  MySqlCreateTableParser(SQLExprParser_ptr exprParser);

  SQLCreateTableStatement_ptr parseCreateTable();

  MySqlExprParser_ptr getExprParser();

  MySqlCreateTableStatement_ptr parseCreateTable(BOOL_ptr acceptCreate);

  SQLPartitionBy_ptr parseLocalPartitionBy();

  SQLPartitionBy_ptr parsePartitionBy();

  SQLPartitionByRange_ptr partitionByRange1();

  SQLPartitionByValue_ptr partitionByValue();

  SQLPartitionByRange_ptr partitionByRange();

  void partitionClauseRest(SQLPartitionBy_ptr clause);

  BOOL_ptr parseTableOptionCharsetOrCollate(MySqlCreateTableStatement_ptr stmt);

  SQLTableConstraint_ptr parseConstraint();
};
